package cn.yitun.chat.yitunservercommonlib.converter.dto2po.user;

import cn.yitun.chat.yitunservercommonlib.crud.yitun.BaseConverter;
import cn.yitun.chat.yitunservercommonlib.dataentity.dto.userchat.UserChatContentDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.po.userchat.UserChatContentInfo;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 用户聊天内容转换
 */
@Mapper(componentModel = "spring")
public interface UserChatContentDto2PoConverter extends BaseConverter<UserChatContentDto, UserChatContentInfo> {

    UserChatContentDto2PoConverter INSTANCE = Mappers.getMapper(UserChatContentDto2PoConverter.class);

    UserChatContentDto do2dto(UserChatContentInfo info);

    List<UserChatContentDto> do2dto(List<UserChatContentInfo> doList);

    @InheritInverseConfiguration
    UserChatContentInfo dto2do(UserChatContentDto dto);
    @InheritInverseConfiguration
    List<UserChatContentInfo> dto2do(List<UserChatContentDto> dtoList);

}
